package libs.yzx.zaza.acts2;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import libs.yzx.zaza.R;

/**
 * Created by Administrator on 2016/9/9
 */
public class SystemUIVisibilityActivity extends AppCompatActivity{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_system_ui_visibility);

        getWindow().getDecorView().setBackgroundColor(Color.RED);

    }


    public void b1(View view){
        /* 类似沉浸式, 将View顶到通知栏的底下 */
        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
    }

    public void b2(View view){
        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
    }

}
